Conditions | 1 |
Paths | 1 |
Total Lines | 24 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | 'use strict'; |
||
10 | describe('events', function () { |
||
11 | var runtime; |
||
12 | |||
13 | before(function () { |
||
14 | _.set(global, 'chrome.runtime', { |
||
15 | onMessage: { |
||
16 | addListener: sinon.spy() |
||
17 | } |
||
18 | }); |
||
19 | |||
20 | runtime = global.chrome.runtime; |
||
21 | }); |
||
22 | |||
23 | describe('initialization', function () { |
||
24 | it('should bind to message events', function () { |
||
25 | var initialCallCount = runtime.onMessage.addListener.callCount; |
||
26 | |||
27 | // eslint-disable-next-line |
||
28 | require(path.join(projectRoot, 'source', 'js', 'events')); |
||
29 | |||
30 | expect(runtime.onMessage.addListener.callCount).to.be.greaterThan(initialCallCount); |
||
31 | }); |
||
32 | }); |
||
33 | }); |
||
34 |